/*
 * @(#) BaseAction.java  1.0  2004-3-10
 *
 * Copyright 2003 by LongTop Corporation.
 * 2669 XieTu Road, ShangHai, PRC 200030
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * LongTop Corporation ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with LongTop.
 */

package com.cnc.bas.web;

import javax.servlet.ServletContext;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionServlet;

import com.cnc.bas.util.SpringBeanFactory;




public class BasAction extends Action {
   // private WebApplicationContext wac;
    protected ServletContext context;
    
    protected static Log log = LogFactory.getLog(BasAction.class);

    public void setServlet(ActionServlet actionServlet) {
        super.setServlet(actionServlet);
        context = actionServlet.getServletContext();
        //wac = WebApplicationContextUtils.getRequiredWebApplicationContext(context);
    }

    protected Object getBean(String beanName) {
        //return wac.getBean(beanName);
    	return SpringBeanFactory.getBean(beanName);
    }
}